package com.taldh.design.patterns.strategy.impl;

import java.util.Arrays;

/**
 * date 2020/6/3
 *
 * @author 袁小黑
 * @version 1.0.0
 **/

public class App {

    public static void main(String[] args) {
        String[] testSort1={"aaaa","lyy","ydh","love","forever"};
        String[] testSort2={"aaaa","lyy","ydh","love","forever"};
        Sorter sorter = new Sorter();
        sorter.sort(testSort1);
        System.out.println(Arrays.toString(testSort1));
        sorter.setSortStrategy(new QuickSortStrategy());
        sorter.sort(testSort2);
        System.out.println(Arrays.toString(testSort2));
    }
}
